package com.hushao.lims.weblims.service;

import com.hushao.lims.weblims.domain.ConsumableInfo;
import com.hushao.lims.weblims.domain.ConsumableRepertory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @author 930588706
 * @date 18/1/22
 * 耗材库存
 */
public interface ConsumableRepertoryService {
    /**
     * 根据耗材名称模糊查询耗材库存(分页)
     * @param consumableName
     * @param pageable
     * @return
     */
    Page<ConsumableRepertory> listConsumableByName(String consumableName, Pageable pageable);

    /**
     * 根据耗材信息查询其库存
     * @param consumableInfo
     * @return
     */
    ConsumableRepertory findByConsumable(ConsumableInfo consumableInfo);

    /**
     * 添加或跟新数据
     * @param consumableRepertory
     * @return
     * @throws Exception
     */
    ConsumableRepertory saveOrUpdate(ConsumableRepertory consumableRepertory) throws Exception;
}
